var express = require('express');
var router = express.Router();
let {getModelByName, Slide} = require('../database/sequelize');


/* GET home page. */
router.get('/', async function (req, res, next) {
  let slideList = await getModelByName("slide").findAll({where:{is_show:"1"}});
  let companyData = await getModelByName("company").findOne();

  res.render('index', {
    navList:[],
    slideList,
    logo:companyData.logo
  });
});

module.exports = router;
